<?php require_once(dirname(__FILE__) . '/inc/config.inc.php');
IsModelPriv('goodsorder');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>renl</title>
    <link href="templates/style/admin.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="templates/js/jquery.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->

    <link href="layui/css/layui.css" rel="stylesheet" type="text/css" media="all"/>
    <script src="layui/layui.all.js"></script>
</head>
<body>


<style>
    .layui-upload-list img { max-width: 200px; height: auto;}

    .layui-form-label {
        float: left;
        display: block;
        padding: 9px;
        width: 60px;
        font-weight: 400;
        line-height: 20px;
        text-align: right;
    }

    .layui-input-block {
        margin-left: 80px;
        min-height: 36px;
    }
</style>
<div class="layui-form" style="margin: 20px 40px">
    <?php
    for ($i = 0; $i < 13; $i++) {
        if (strtotime('-' . $i . ' month') > strtotime('2020-10')) {
            $m=date('Y-m', strtotime('-' . $i . ' month'));
            echo '<div class="layui-form-item">';
            echo '<a href="json/fee/baobiaoFeeType.php?m='.$m.'"  class="layui-btn   layui-btn-fluid">'.$m.'月份奖罚报表</a>';
            echo '</div>';
        }
    }
    ?>

</div>

<script>
    layui.use(['form', 'laydate', 'table', 'layedit', 'upload'], function () {
        var $ = layui.$,
            admin = layui.admin,
            element = layui.element,
            layer = layui.layer,
            view = layui.view,
            table = layui.table,
            laytpl = layui.laytpl,
            laydate = layui.laydate,
            layedit = layui.layedit,
            upload = layui.upload,
            form = layui.form;


        form.render(null, 'layuiadmin-form-tags');
        //监听提交
        form.on('submit(layuiadmin-app-tags-submit)', function (data) {
            var field = data.field; //获取提交的字段
            //提交 Ajax 成功后，关闭当前弹层并重载表格
            $.ajax({
                url: "json/member/member_do.php",
                data: {
                    "field": field,
                    "action": 'update'
                },
                type: "POST",
                dataType: "json",
                success: function (res) {
                    console.log(res);
                    if (res.code == 0) {
                        console.log("返回成功");
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭
                    }

                }
            });
        });

    });
</script>
</body>
</html>